﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace autoBidProject
{
    class Match
    {
        private string home, away;
        private List<Event> events;

        public void Add(Event _event)
        {
            events.Add(_event);
        }

        public List<Event> GetEvents()
        {
            return new List<Event>();
        }

        public Match(string home, string away)
        {
            this.home = home;
            this.away = away;
            this.events = new List<Event>();
        }

        public string Name()
        {
            return home + " - " + away;
        }

        public bool Same(Match anotherMatch)
        {
            if (this.home.IndexOf(anotherMatch.home) != -1 || anotherMatch.home.IndexOf(this.home) != -1)
                return true;

            if (this.away.IndexOf(anotherMatch.away) != -1 || anotherMatch.away.IndexOf(this.away) != -1)
                return true;

            return false;
        }
    }
}
